﻿@{
    var version = typeof(IdentityServer4.Hosting.IdentityServerMiddleware).Assembly.GetName().Version.ToString();
}

<div class="welcome-page">
    <div class="row page-header">
        <div class="col-sm-10">
            <h1>
                <img class="icon" src="~/icon.jpg">
                Welcome to the IdentityServer4 demo site
                <small>(version @version)</small>
            </h1>
        </div>
    </div>

    <div class="row">
        <div class="col-sm-8">
            <p>
                IdentityServer publishes a
                <a href="~/.well-known/openid-configuration">discovery document</a>
                where you can find metadata and links to all the endpoints, key material, etc.
            </p>
        </div>
        <div class="col-sm-8">
            <p>
                You can use the following clients (see <a href="https://github.com/IdentityServer/IdentityServer4.DemoSite/blob/master/src/IdentityServer4Demo/Config.cs">here</a> for the code definition).
            </p>
            <p>
                Click <a href="~/grants">here</a> to manage your stored grants.
            </p>
        </div>
    </div>
    <div class="row">
        <div class="col-sm-8">
            <p>
                <b>client id: m2m</b> <br />
                grant type: client credentials <br />
                client secret: secret <br />
                access token lifetime: 60 minutes<br />
                allowed scopes: api
            </p>
            <p>
                <b>client id: m2m.short</b> <br />
                grant type: client credentials <br />
                client secret: secret <br />
                access token lifetime: 75 seconds<br />
                allowed scopes: api
            </p>

            <p>
                <b>client id: interactive.confidential</b> <br />
                grant type: authorization code with PKCE and client credentials<br />
                client secret: secret <br />
                access token lifetime: 60 minutues<br />
                allowed scopes: openid profile email api offline_access
            </p>
            <p>
                <b>client id: interactive.confidential.short</b> <br />
                grant type: authorization code with PKCE and client credentials<br />
                client secret: secret <br />
                access token lifetime: 75 seconds<br />
                allowed scopes: openid profile email api offline_access
            </p>

            <p>
                <b>client id: interactive.public</b> <br />
                grant type: authorization code with PKCE and client credentials<br />
                access token lifetime: 60 minutues<br />
                allowed scopes: openid profile email api offline_access
            </p>
            <p>
                <b>client id: interactive.public.short</b> <br />
                grant type: authorization code with PKCE and client credentials<br />
                access token lifetime: 75 seconds<br />
                allowed scopes: openid profile email api offline_access
            </p>

            <p>
                <b>client id: device</b> <br />
                grant type: urn:ietf:params:oauth:grant-type:device_code <br />
                access token lifetime: 60 minutues<br />
                allowed scopes: openid profile email api
            </p>

            <p>
                You can call a test API at https://demo.identityserver.io/api/test.
            </p>
        </div>
    </div>
</div>
